package com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate;

import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.dto.BusinessEmployeeCertificateListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.param.BusinessEmployeeCertificateCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.param.BusinessEmployeeCertificateDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.param.BusinessEmployeeCertificateListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.param.BusinessEmployeeCertificateUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 员工资格证书
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Employee Certificate Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessEmployeeCertificateCloudServiceFallback.class)
@RequestMapping("/business/employee/certificate")
public interface BusinessEmployeeCertificateCloudService {

    // 查询员工资格证书列表
    @ApiOperation(value = "Query Employee Certificate List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.BusinessEmployeeCertificateCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessEmployeeCertificateListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Employee Certificate List", dataType = "BusinessEmployeeCertificateListCloudParam", dataTypeClass = BusinessEmployeeCertificateListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessEmployeeCertificateListCloudDto list(BusinessEmployeeCertificateListCloudParam param);

    // 创建员工资格证书
    @ApiOperation(value = "Create Employee Certificate", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.BusinessEmployeeCertificateCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Employee Certificate", dataType = "BusinessEmployeeCertificateCreateCloudParam", dataTypeClass = BusinessEmployeeCertificateCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessEmployeeCertificateCreateCloudParam param);


    // 编辑员工资格证书
    @ApiOperation(value = "Update Employee Certificate", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.BusinessEmployeeCertificateCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Employee Certificate", dataType = "BusinessEmployeeCertificateUpdateCloudParam", dataTypeClass = BusinessEmployeeCertificateUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessEmployeeCertificateUpdateCloudParam param);


    // 删除员工资格证书
    @ApiOperation(value = "Delete Employee Certificate", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.certificate.BusinessEmployeeCertificateCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Employee Certificate", dataType = "BusinessEmployeeCertificateDeleteCloudParam", dataTypeClass = BusinessEmployeeCertificateDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessEmployeeCertificateDeleteCloudParam param);

}
